package ipt.capitulo21;
import java.io.*;
import javax.swing.*;
import java.net.* ;
public class LeePoesia{
	void leePoesia(URL url, JTextArea aTexto){
		String texto="";
		try{
			InputStream fis = url.openStream() ;
			Reader sRead = new BufferedReader(
						new InputStreamReader(fis));
			BufferedReader fE=new BufferedReader(sRead);
			while(texto != null){
				texto = fE.readLine();
				aTexto.append(texto+'\n');
			}
			fE.close();
		}catch(IOException e){
			System.out.println("Error en el fichero");
		}
	}
}
